Hello, Object source -> Object target ..... int abs = o."Absolute Number" Object oStart = object abs int iReference = intOf realOf Reference Object oEnd = object iReference oStart -> oEnd ..... i get error in <line 6> null Object parameter was passed into argument position 2 I know I'm missing something simple. Can someone out there please clue me in? Thanks!
Control17 - Mon Sep 11 04:03:41 EDT 2017 |
Re: Create links Obviously, oEnd is null. The reason is probably that either Reference is an empty string or iReference is a number that references an object that is not available in the current view. print is your friend...
.....
int abs = o."Absolute Number"
print "abs is ->" abs "<-\n"
Object oStart = object abs
print "oStart is " (null oStart? "null" : oStart."Absolute Number""") "\n"
print "Reference is ->" Reference "<-\n"
int iReference = intOf realOf Reference
print "iReference is -> " iReference "<-\n"
Object oEnd = object iReference
print "oEnd is " (null oEnd? "null" : oEnd."Absolute Number""") "\n"
oStart -> oEnd
By the way: variable "o" already contains the start Object. There is no reason to extract the absolute number from o and then get the object corresponding to the absolute number again. So, just use "o -> oEnd" or if you want to, create a variable "Object oStart = o" |
Re: Create links Mike.Scharnow - Mon Sep 11 08:34:11 EDT 2017 Obviously, oEnd is null. The reason is probably that either Reference is an empty string or iReference is a number that references an object that is not available in the current view. print is your friend...
.....
int abs = o."Absolute Number"
print "abs is ->" abs "<-\n"
Object oStart = object abs
print "oStart is " (null oStart? "null" : oStart."Absolute Number""") "\n"
print "Reference is ->" Reference "<-\n"
int iReference = intOf realOf Reference
print "iReference is -> " iReference "<-\n"
Object oEnd = object iReference
print "oEnd is " (null oEnd? "null" : oEnd."Absolute Number""") "\n"
oStart -> oEnd
By the way: variable "o" already contains the start Object. There is no reason to extract the absolute number from o and then get the object corresponding to the absolute number again. So, just use "o -> oEnd" or if you want to, create a variable "Object oStart = o" Hello Miki, thank u for your reply , i do it and i get error in <line 11> Cannot create link: no access to source object
and oStart is available
Regards, Neven |
Re: Create links Control17 - Mon Sep 11 09:00:01 EDT 2017 Hello Miki, thank u for your reply , i do it and i get error in <line 11> Cannot create link: no access to source object
and oStart is available
Regards, Neven hm, are you sure that you have write access to oStart? Did you open the module in Exclusive Edit mode? |
Re: Create links Mike.Scharnow - Mon Sep 11 09:30:08 EDT 2017 hm, are you sure that you have write access to oStart? Did you open the module in Exclusive Edit mode? thank u , I get it in Exclusive Edit mode .
Regards, Neven |